//
//  HXDBaseViewController.m
//  qingDaoCircleOfLife
//
//  Created by huxuedong on 15/11/21.
//  Copyright © 2015年 huxuedong. All rights reserved.
//

#import "HXDBaseViewController.h"
#import "MBProgressHUD+MJ.h"
#import "UIView+Toast.h"

@interface HXDBaseViewController ()

{
    MBProgressHUD *HUD;
}

@end

@implementation HXDBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)showLoadView {
    HUD = [[MBProgressHUD alloc] initWithView:self.view];
    [HUD show:YES];
    [self.view addSubview:HUD];
}

- (void)dismissLoadView {
    if (HUD) {
        [HUD removeFromSuperview];
        [HUD hide:YES];
        HUD = nil;
    }
}

//显示网络加载信息
- (void)showLoadViewWithMessage:(NSString *)message {
    [MBProgressHUD showMessage:message];
}

//显示提示信息
- (void)showToastMessage:(NSString *)toastMessage {
    [self.view makeToast:toastMessage];
}

@end
